import request from '@/utils/request'

export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'get',
    params: { dictCode }
  })
}

export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionnaireTopic/queryPage',
    method: 'post',
    data
  })
}
export function query(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionnaireTopic/query',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionnaireTopic/deleteById',
    method: 'post',
    data
  })
}

export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionnaireTopic/get',
    method: 'post',
    data
  })
}
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionnaireTopic/insert',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionnaireTopic/update',
    method: 'post',
    data
  })
}

export function updateState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionnaireTopic/updateStatus',
    method: 'post',
    data
  })
}

export function importFile(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/ttsxexam/manage/examQuestion/questionImport',
    method: 'post',
    data
  })
}
